package com.text;

import com.dao.user.MyBatisDao;
import com.entity.MyBatis;
import com.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

public class MyBatisTest {
    @Test
    public void getTextMyBatis(){
        SqlSession sqlSession = null;
        List<MyBatis> myBatisList = new ArrayList<MyBatis>();
        try{
            sqlSession = MyBatisUtil.createSqlSession();
            myBatisList = sqlSession.getMapper(MyBatisDao.class).getMyBatis();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
